{% extends "base.html" %}
{% block header %}

<script src="/static/js/user_location.js"></script>
<input type="hidden" id="city_result" name="variable" value="{{ city_list }}">
<input type="hidden" id="sem" name="variable" value="{{ result.sem }}">
<input type="hidden" id="seo" name="variable" value="{{ result.seo }}">
<input type="hidden" id="during" name="variable" value='{{ result.during }}'>

{% endblock%}
{% block title %}用户分布
{% endblock%}
{% block content %}
<header class="hero-unit " align="center">
<div id="chart_user_location" style="min-width: 400px; height: 400px; margin: 0 auto"></div>
</header>
<div class="well">
       <table class="table table-bordered">
         <thead>
           <tr>
             <th>地区</th>
             <th>数量</th>
           </tr>
         </thead>
         <tbody>
 			{% if table_list.object_list %} 				
 			{% for item in table_list.object_list %}
 			<tr>
                <td><p>{{item.c_city}}</p></td>
                <td><p>{{ item.c }}</p></td>

 			</tr>
 			{% endfor %}
 			<div class="pagination">
                 <ul>
                     {% if table_list.has_previous %}
                     <li><a href="/userinfo/user_location?page={{ result_list.previous_page_number }}">&laquo;</a></li> 
                     {% else %}
                     <li class="disabled"><a>&laquo;</a></li> 
                     {% endif %}
                     {% for p in page_range %}
                     {% ifequal p table_list.number %}
                     <li class="active"><a href="#">{{p}}</a></li>
                     {% else %}
                     <li><a href="/userinfo/user_location?page={{p}}">{{p}}</a></li>
                     {% endifequal %}
                     {% endfor %}
                     {% if table_list.has_next %}
                     <li><a href="/userinfo/user_location?page={{ result_list.next_page_number }}">&raquo;</a></li>
                     {% else %}
                      <li class="disabled"><a>&raquo;</a></li>
                     {% endif %}
                          

                 </ul>
               </div>

 			 			{% else %}
 			<tr><td colspan="4">没有结果<br><a class="label  label-important">暂时没有发现数据。</a>
 			</td></tr>
 			{% endif %}
 			
         </tbody>
       
       </table>
	<div class="pagination">
                 <ul>
                     {% if result_list.has_previous %}
                     <li><a href="/userinfo/use_time?page={{ result_list.previous_page_number }}">&laquo;</a></li> 
                     {% else %}
                     <li class="disabled"><a>&laquo;</a></li> 
                     {% endif %}
                     {% for p in page_range %}
                     {% ifequal p result_list.number %}
                     <li class="active"><a href="#">{{p}}</a></li>
                     {% else %}
                     <li><a href="/userinfo/use_time?page={{p}}">{{p}}</a></li>
                     {% endifequal %}
                     {% endfor %}
                     {% if result_list.has_next %}
                     <li><a href="/userinfo/use_time?page={{ result_list.next_page_number }}">&raquo;</a></li>
                     {% else %}
                      <li class="disabled"><a>&raquo;</a></li>
                     {% endif %}
                          

                 </ul>
               </div>

</div>

{% endblock %}